package org.zezs.deployment.config;

import com.alibaba.fastjson.annotation.JSONField;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.Session;

public class Nginx {
    private String proxy_pass="";//自动解析不需要配置
    private String head="" +
//            "upstream backend                    #配置后端服务器组\n" +
//            "{\n" +
//            "   server 127.0.0.1:9080;\n" +
//            "   server 127.0.0.1:8080;          #默认weight=1\n" +
//            "}\n" +
            "{\n " +
            "    listen         80;\n" +
            "    server_name   testadmin.juzixinche.com;\n" +
            "    client_max_body_size       20m;\n" +
            "    access_log  /var/log/nginx/admin_access.log ;\n" +
            "    error_log  /var/log/nginx/admin_error.log  ;\n" +
            "    location /{\n" +
            "        proxy_set_header Host $host;\n" +
            "        proxy_set_header X-Real-IP $remote_addr;\n" +
            "        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n" +
            "        proxy_pass backend;\n" +
            "   }\n" +
            "}";


    private String configFile;

    public String getHead() {
        return head;
    }

    public void setHead(String head) {
        this.head = head;
    }


    public static void main(String[] args) {
        System.out.println(new Nginx().head);
    }

    public String getConfigFile() {
        return configFile;
    }

    public void setConfigFile(String configFile) {
        this.configFile = configFile;
    }

    private SshInfo sshInfo;
    @JSONField(serialize=false)
    private Session session;

    public SshInfo getSshInfo() {
        return sshInfo;
    }

    public void setSshInfo(SshInfo sshInfo) {
        this.sshInfo = sshInfo;
    }

    public Session getSession() {
        return session;
    }

    public void setSession(Session session) {
        this.session = session;
    }

    public String getProxy_pass() {
        return proxy_pass;
    }

    public void setProxy_pass(String proxy_pass) {
        this.proxy_pass = proxy_pass;
    }
}
